########################################################################
#
#       ORIGIN:     FUYONG .
#       GROUP:      
#       PROJECT:    USED FOR GCC Makefile
#       DATE:       April 2009.
#       PURPOSE:    Standard application makefile
#                   
#       NOTE:       This include makefile assumes the source modules
#                   are organised into the linux directory structure.
#
#       $Revision: $
#       $Date: 7-Jan-2009.09:35:44 $ 
########################################################################

#######config environment value###################################

export CHIP_TYPE=HI3798MV200

#######config root and output dir#################################

export SDK_DIR = $(shell pwd)/../../HiSTBLinuxV100R005C00SPC051
export ROOT_DIR = $(shell pwd)/..
export PROJECT_DIR = $(shell pwd)
export OUT_DIR = $(shell pwd)/out


#######config hardware information################################


#######config application OSD style module##############################



#######end config environment value######################################

include $(PROJECT_DIR)/config/plantform.mk

##################################################################

.PHONY: all clean

.PHONY:  DRV_LIB APP MAIN_APP
.PHONY:  DRV_LIB_CLEAN APP_CLEAN MAIN_APP_CLEAN


ALL_LIBS:= DRV_LIB APP MAIN_APP
ALL_LIBS_CLEAN:= DRV_LIB_CLEAN APP_CLEAN MAIN_APP_CLEAN

########################################################################

########################################################################
		
all: $(ALL_LIBS)
	#mkdir $(PROJECT_DIR)/bin
	 cp ./out/app ./bin	 
	#./mkyaffs2image ./bin/ ./app.yaffs 1 1	 
	#chmod a+r ./bin/app.yaffs
	
clean: $(ALL_LIBS_CLEAN)
	rm -rf $(PROJECT_DIR)/bin/app  $(PROJECT_DIR)/bin/app.yaffs
DRV_LIB:
	$(MAKE) $(ROOT_DIR)/driver all
APP:
	$(MAKE) $(ROOT_DIR)/app all	
MAIN_APP:
	$(MAKE) $(ROOT_DIR)/main all

		
DRV_LIB_CLEAN:
	$(MAKE) $(ROOT_DIR)/driver clean
APP_CLEAN:
	$(MAKE) $(ROOT_DIR)/app clean
MAIN_APP_CLEAN:
	$(MAKE) $(ROOT_DIR)/main clean



	
	
	

	
	
	
